import http from '@/utils/http'
// 当前用户菜单
export const currentUserMenu = (userId) => {
    return http.get(`/auth/menu/menus/user/${userId}`);
}
// 菜单树
export const treeMenuApi = () => {
    return http.get(`/auth/menu/tree`); 
}
// 当前角色菜单
export const currentRoleMenu = (roleId) => {
    return http.get(`/auth/menu/menus/role/${roleId}`);
}
//  菜单分配
export const assignMenuApi = (data) => {
    return http.post('/auth/role/assign', data);
}
export const oneMenusApi = () => { 
    return http.get('/auth/menu/menus/one');
}







export const menusApi = () => {
    return http.get('/auth/menu/menus');
}

export const editMenuApi = (data) => {
    return http.post('/auth/menu/edit',data);
}

export const addMenuApi = (data) => {
    return http.post('/auth/menu/add',data);
}

export const menuInfByIdoApi = (menuId) => {
    return http.get(`/auth/menu/info/${menuId}`);
}

export const delMenuApi = (menuId) => {
    return http.get(`/auth/menu/del/${menuId}`);
}
